//
//  KonghaoTopCell.m
//  BMProject
//
//  Created by chris on 16/1/2.
//  Copyright © 2016年 BMProject. All rights reserved.
//

#import "KonghaoTopCell.h"
#import "DataModel.h"
#import "IQUIView+Hierarchy.h"
#import "UIViewController+order.h"
#import "NSDate+Utils.h"

@interface KonghaoTopCell()
@property (weak, nonatomic) IBOutlet UILabel *numLa;//工单号
@property (weak, nonatomic) IBOutlet UILabel *statusLa;//工单状态

@property (weak, nonatomic) IBOutlet UILabel *typeLa;//类型
@property (weak, nonatomic) IBOutlet UILabel *dateLa;//创建时间

@property (weak, nonatomic) IBOutlet UILabel *shenqingLa;//申请数目
@end

@implementation KonghaoTopCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setInfo:(OrderDealModel *)model {
    self.numLa.text =     [NSString ignoreEmptyStr:model.id];
    self.statusLa.text =  [NSString ignoreEmptyStr:[_vc getOrderStatusNameFromtypeId:model.type.intValue andSignId:model.sign.intValue]];
    self.typeLa.text =    [NSString ignoreEmptyStr:[_vc getOrderTypeNameFromtypeId:model.type.intValue]];
    self.dateLa.text =    [[NSDate dateWithString:model.creatTime formatString:@"yyyyMMddHHmmss"] formatStringWithFormat:@"yyyy-MM-dd"];//20151202111348  2015-12-12

    //申请数目
    self.shenqingLa.text = @"";
    self.shijiLa.text = @"";
}

- (void)setOrderContentInfo:(OrderDealDetailOrderContentInfo *)orderContentInfo {
    self.shenqingLa.text = [NSString ignoreEmptyStr:orderContentInfo.sqAmount];
    self.shijiLa.text = [NSString ignoreEmptyStr:orderContentInfo.sjAmount replaceStr:self.shenqingLa.text];//todo BruceDuan 实发数目是申请数目还是服务器的实际
}


@end
